package Timer;

public class MyTask implements Comparable<MyTask>{
    public Runnable runnable;
    public long time;

    public MyTask(Runnable runnable,long time){
        this.runnable = runnable;
        this.time = time + System.currentTimeMillis();
    }


    @Override
    public int compareTo(MyTask o) {
        return  (int)(this.time - o.time);
    }
}
